/*********************************************************
          File Name:10.1.cpp
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Tue 15 Sep 2015 11:21:06 AM CST
**********************************************************/

#include <iostream>
#include <vector>
#include <algorithm>
#include <list>
#include <string>

int main()
{
        std::vector<int> v{1, 2, 3, 3, 3, 309};
        std::cout << "the number 3 appears " << std::count(v.begin(), v.end(), 3)
                << " times" << std::endl;

        std::list<std::string> ls{"this", "is", "a", "a", "test"};
        std::cout << "`a` appears " << std::count(ls.begin(), ls.end(), "a")
                << " times" << std::endl;

        return 0;
}
